<template>
  <div style="border: 3px soild blue">
    <button @click="changeSon">改名为son</button>
    <h3>儿子组件 {{ $store.state.userInfo  }}</h3>
  </div>
</template>

<script>
export default {
  methods:{
    changeSon(){
      this.$store.commit('setUserInfo', {name: 'son'})
      this.$store.dispatch('abc', {name: 'kkk'})
    }
  }
}
</script>

<style>

</style>